package com.example.fms.controller;

import com.example.fms.dto.req.NoticeReq;
import com.example.fms.dto.resp.NoticeResp;
import com.example.fms.dto.resp.RightRespDto;
import com.example.fms.service.NoticeService;
import com.example.fms.vo.ResponseBean;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/notice")
public class NoticeController {

    @Resource
    NoticeService noticeService;


    @PostMapping("/getNotice")
    public ResponseBean<NoticeResp> getNotice() {
        return ResponseBean.successMeat(noticeService.getNotice());

    }




    @PostMapping("/update")
    public ResponseBean<Boolean>  update(@RequestBody NoticeReq req) {

        return ResponseBean.successMeat(noticeService.update(req));
    }

}
